<?php if (isset($_SERVER['HTTP_USER_AGENT']) && !strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6')) echo '<?xml version="1.0" encoding="UTF-8"?>'. "\n"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" xml:lang="<?php echo $lang; ?>">
<head>
<title><?php echo $title; ?></title>
<meta content="*" name="robots" />
<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<link type="image/x-icon" href="<?php echo $icon; ?>" rel="icon">
<link type="image/x-icon" href="<?php echo $icon; ?>" rel="shortcut icon">
<base href="<?php echo $base; ?>" />
<?php foreach ($links as $link) { ?>
<link href="<?php echo str_replace('&', '&amp;', $link['href']); ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<link media="all" href="catalog/view/theme/<?php echo $template; ?>/stylesheet/lightbox.css" type="text/css" rel="stylesheet">
<link media="all" href="catalog/view/theme/<?php echo $template; ?>/stylesheet/reset.css" type="text/css" rel="stylesheet">
<link media="all" href="catalog/view/theme/<?php echo $template; ?>/stylesheet/boxes.css" type="text/css" rel="stylesheet">
<link media="all" href="catalog/view/theme/<?php echo $template; ?>/stylesheet/menu.css" type="text/css" rel="stylesheet">
<link media="all" href="catalog/view/theme/<?php echo $template; ?>/stylesheet/clears.css" type="text/css" rel="stylesheet">
<link media="all" href="catalog/view/theme/<?php echo $template; ?>/stylesheet/style.css" type="text/css" rel="stylesheet">
<link media="print" href="catalog/view/theme/<?php echo $template; ?>/stylesheet//print.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="catalog/view/javascript/jquery/ajax_add.js"></script>
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie6.css" />
<script type="text/javascript" src="catalog/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
<script>
DD_belatedPNG.fix('img, #header .div3 a, #content .left, #content .right, .box .top');
</script>
<![endif]-->
<?php foreach ($styles as $style) { ?>
<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>
<script type="text/javascript" src="catalog/view/javascript/prototype.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.3.2.min.js"></script>

<script type="text/javascript" src="catalog/view/javascript/jquery.jshowoff.min.js"></script>
<script>
   var $j = jQuery.noConflict();
</script>
<script src="catalog/view/javascript/validation.js" type="text/javascript"></script>

<script src="catalog/view/javascript/builder.js" type="text/javascript"></script>
<script src="catalog/view/javascript/effects.js" type="text/javascript"></script>
<script src="catalog/view/javascript/dragdrop.js" type="text/javascript"></script>
<script src="catalog/view/javascript/controls.js" type="text/javascript"></script>
<script src="catalog/view/javascript/slider.js" type="text/javascript"></script>
<script src="catalog/view/javascript/js.js" type="text/javascript"></script>
<script src="catalog/view/javascript/form.js" type="text/javascript"></script>
<script src="catalog/view/javascript/menu.js" type="text/javascript"></script>
<script src="catalog/view/javascript/translate.js" type="text/javascript"></script>
<script src="catalog/view/javascript/cookies.js" type="text/javascript"></script>
<script src="catalog/view/javascript/ccard.js" type="text/javascript"></script>
<script src="catalog/view/javascript/lightbox.js" type="text/javascript"></script>
<script src="catalog/view/javascript/popup-preview.js" type="text/javascript"></script>
<?php foreach ($scripts as $script) { ?>
<script type="text/javascript" src="<?php echo $script; ?>"></script>
<?php } ?>
<script type="text/javascript"><!--
function bookmark(url, title) {
	if (window.sidebar) { // firefox
    window.sidebar.addPanel(title, url, "");
	} else if(window.opera && window.print) { // opera
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	} else if(document.all) {// ie
   		window.external.AddFavorite(url, title);
	}
}
//--></script>
<!--[if lt IE 8]>
<link rel="stylesheet" type="text/css" href="/css/iestyles.css" media="all" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="/css/ie7minus.css" media="all" />
<script type="text/javascript" src="js/ds-sleight.js"></script>
<script type="text/javascript" src="js/iehover-fix.js"></script>
<![endif]-->
<script type="text/javascript">var Translator = new Translate({"Credit card number doesn't match credit card type":"Credit card number does not match credit card type","Please use only letters (a-z or A-Z), numbers (0-9) or underscore(_) in this field, first character should be a letter.":"Please use only letters (a-z or A-Z), numbers (0-9) or underscores (_) in this field, first character must be a letter."});</script><style type="text/css" media="screen">#dddContent {visibility:hidden}</style>
</head>
<body class=" catalog-category-view categorypath-fruit-citrus-fruits-html category-citrus-fruits">
	<noscript>
        <div class="noscript">
            <div class="noscript-inner">
                <p><strong>We detected that your JavaScript seem to be disabled.</strong></p>
                <p>You must have JavaScript enabled in your browser to utilize the functionality of this website.</p>
            </div>
        </div>
    </noscript>
 <div class="d4-container" id="d4-container">
	
	
		<div class="d4-header"> <!-- Header Begins -->
		
			<!-- Logo -->
			<div style="position:relative;top:-1000px;">
			<h1>Di cho thue - Di cho thue sai gon - Đi chơ thuê - Đi chợ thuê sài gòn</h1>
			</div>
			<div style="margin-top:-30px;">
			<p id="d4-logo" style="width:0px;margin-top:15px;float:left;"><a href="<?php echo str_replace('&', '&amp;', $home); ?>"><img width="520" src="<?php echo $logo; ?>" alt="<?php echo $store; ?>"/></a></p>		
			</div>
			<!-- Decorations & Top Links & Search Engine -->
			<div class="d4-search-dec">
				<img class="d4-search-dec1" src="catalog/view/theme/<?php echo $template; ?>/images/d4-search-bg-dec1.png" width="95" height="60"/>
				<div class="d4-topright">
				
					<!-- Top Links -->	
					<ul class="top-links">
						<?php if(isset($logged) && $logged == '1' && $name != ''){?>
						<li  class="first"><a href="<?php echo str_replace('&', '&amp;', $account); ?>">Chào, <?php echo $name;?></a></li> <!-- Đã đăng nhập -->
						<li ><a href="<?php echo str_replace('&', '&amp;', $logout); ?>">Đăng xuất</a></li> <!-- Đã đăng nhập -->
						<?php }else{?>						
						<li><a href="<?php echo str_replace('&', '&amp;', $register);?>">Đăng ký</a></li> <!-- Chưa đăng nhập -->
						<li><a href="<?php echo str_replace('&', '&amp;', $login); ?>">Đăng nhập</a></li> <!-- Chưa đăng nhập -->
						<?php }?>
						<li class="last"><a href="<?php echo str_replace('&', '&amp;', $cart); ?>">Xem giỏ hàng</a></li> <!-- Đã và Chưa đăng nhập -->

					</ul>
					
					<!-- Search Box -->
					<div class="clear"></div>
					<div class="d4-search">
						<div class="">
							
								<fieldset id="content_search input">
									<input id="filter_keyword" type="text" class="d4-searchinput" name="q" value="<?php echo $keyword; ?>" />
									<input type="image" onclick = "moduleSearch();" src="catalog/view/theme/<?php echo $template; ?>/images/d4-search-btn.png" alt="Search" />
									<div id="search_autocomplete" class="search-autocomplete"></div>
									<script type="text/javascript">
										//<![CDATA[
										var searchForm = new Varien.searchForm('search_mini_form', 'search', 'Nhập từ khóa tìm kiếm...');
										searchForm.initAutocomplete('http://demo.aheadworks.com/20/catalogsearch/ajax/suggest/', 'search_autocomplete');
										//]]>
									</script>
								</fieldset>
								<script type="text/javascript">
								$j('#d4-container').keydown(function(e) {
									if (e.keyCode == 13) {
										moduleSearch();
									}
								});
								</script>
						</div>
					</div>
				</div>
			</div>
		</div> <!-- Header Ends -->		
<script type="text/javascript"><!-- 
function getURLVar(urlVarName) {
	var urlHalves = String(document.location).toLowerCase().split('?');
	var urlVarValue = '';
	
	if (urlHalves[1]) {
		var urlVars = urlHalves[1].split('&');

		for (var i = 0; i <= (urlVars.length); i++) {
			if (urlVars[i]) {
				var urlVarPair = urlVars[i].split('=');
				
				if (urlVarPair[0] && urlVarPair[0] == urlVarName.toLowerCase()) {
					urlVarValue = urlVarPair[1];
				}
			}
		}
	}
	
	return urlVarValue;
} 

$(document).ready(function() {
	route = getURLVar('route');
	
	if (!route) {
		$('#tab_home').addClass('selected');
	} else {
		part = route.split('/');
		
		if (route == 'common/home') {
			$('#tab_home').addClass('selected');
		} else if (route == 'account/login') {
			$('#tab_login').addClass('selected');	
		} else if (part[0] == 'account') {
			$('#tab_account').addClass('selected');
		} else if (route == 'checkout/cart') {
			$('#tab_cart').addClass('selected');
		} else if (part[0] == 'checkout') {
			$('#tab_checkout').addClass('selected');
		} else {
			$('#tab_home').addClass('selected');
		}
	}
});
//--></script>
<script type="text/javascript"><!--
$j('#search input').keydown(function(e) {
	if (e.keyCode == 13) {
		moduleSearch();
	}
});

function moduleSearch() {	
	pathArray = location.pathname.split( '/' );
	
	url = location.protocol + "//" + location.host + "/" + pathArray[1] + '/';
		
	url += 'index.php?route=product/search';
		
	var filter_keyword = $j('#filter_keyword').attr('value')
	
	if (filter_keyword) {
		url += '&keyword=' + encodeURIComponent(filter_keyword);
	}
	
	
		url += '&category_id=0';

	
	location = url;
}
//--></script>
<script type="text/javascript"><!--
$('.switcher').bind('click', function() {
	$(this).find('.option').slideToggle('fast');
});
$('.switcher').bind('mouseleave', function() {
	$(this).find('.option').slideUp('fast');
}); 
//--></script>
